// src/api/index.js
import axios from 'axios'; // Vite 会自动处理依赖
const apiClient = axios.create({
  baseURL: 'http://localhost:3000',
});

export const login = (username, password) => apiClient.post('/login', { username, password });
export const getPetDetails = (petId) => apiClient.get(`/pets/${petId}`);
export const adoptPet = (petId) => apiClient.post(`/adopt/${petId}`);
export const getPetsList = () => apiClient.get('/pets');